#ifndef REGISTERWIDGET_H
#define REGISTERWIDGET_H

#include <QWidget>
#include"Global.h"
namespace Ui {
class RegisterWidget;
}

class RegisterWidget : public QWidget
{
    Q_OBJECT

public:
    explicit RegisterWidget(QWidget *parent = nullptr);
    ~RegisterWidget();

private slots:
    void on_GetVerifyPushButton_clicked();
    void slot_reg_mod_finish(ReqId id,QString res ,ErrorCode err);
    void on_RegisterPushButton_clicked();

    void on_CancelPushButton_clicked();

private:
    void ShowTip(QString str,bool is_ok);
    void InitHttpHandlers();
private:
    Ui::RegisterWidget *ui;
    QMap<ReqId,std::function<void(const QJsonObject&)>> _handlers;
};

#endif // REGISTERWIDGET_H
